package com.caesar.method_son;

/**
 * @author caesar
 * @date 2025/7/9
 * @Description:经理
 * @apiNote
 */
public class Manager extends SalaryEmployee{
    private double bonusRatio;//奖金比例

    public Manager() {
    }

    public Manager(String name, double salary, double bonusRatio) {
        super(name, salary);
        this.bonusRatio = bonusRatio;
    }

    public double getBonusRatio() {
        return bonusRatio;
    }

    public void setBonusRatio(double bonusRatio) {
        this.bonusRatio = bonusRatio;
    }

    @Override
    public double earning() {
        return getSalary() * (1 + bonusRatio);
    }

    @Override
    public String getBasicInfo() {
        return "职位：经理"+"\t姓名：" + getName()+"\t月薪：" +getSalary()+"\t奖金比例：" + getBonusRatio();
    }
}
